﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Guline.HosterModels.Object
{
    public class Organize
    {
        [Key]
        public int ID { get; set; }
        [Required(ErrorMessage = "Chưa nhập tên tổ chức")]
        public string Name { get; set; }
        public Nullable<int> Status { get; set; }
        //[Required(ErrorMessage = "The HostingPackageID field is required")]
        public Nullable<int> HostingPackageID { get; set; }
        public string OrganizeFolder { get; set; }
        public string Notes { get; set; }
        public Nullable<DateTime> StartDate { get; set; }
        public Nullable<int> YearPrices { get; set; }
        public Nullable<DateTime> NextPaymentDate { get; set; }
        public Nullable<DateTime> NextPaymentBefore7Date { get; set; }
        public int AuthorID { get; set; }
        [ForeignKey("AuthorID")]
        public virtual Account Account { get; set; }

        [InverseProperty("Organize")]
        public virtual ICollection<Website> Websites { get; set; }

        [InverseProperty("Organize")]
        public virtual ICollection<MailAccount> MailAccounts { get; set; }

        [InverseProperty("Organize")]
        public virtual ICollection<FTPAccount> FTPAccounts { get; set; }
    }
}
